<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<script type="text/javascript">

    window.onload = function (){
        var farmId =$("#farmId").val();
       $("#button1").attr("value",farmId);
       $("#button2").attr("value",farmId);
   }

   function button1(id) {
       layer.open({
           type: 2,
           title: false,
           shadeClose: true,
           shade: false,
           area: ['870px', '590px'],
           maxmin: true, //开启最大化最小化按钮
           content: '/farm/farmShop/room/' + id  // iframe的url
       });
   }

    function button2(id) {
        layer.open({
            type: 2,
            title: false,
            shadeClose: true,
            shade: false,
            area: ['870px', '590px'],
            maxmin: true, //开启最大化最小化按钮
            content: '/farm/farmShop/dish/' + id  // iframe的url
        });
    }
</script>
<body class="gray-bg">

<div class="wrapper wrapper-content ">
   <button type="button" id="button1" value="" onclick="button1(this.value)"  class="btn btn-defult">住宿</button>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <button type="button" id="button2" value=""  onclick="button2(this.value)" class="btn btn-defult">美食</button>


   <input type="hidden" th:value="${farmId}" id="farmId"/>
</div>


</div>
<div th:include="include::footer"></div>
</body>
</html>
